#define _CRT_SECURE_NO_WARNINGS 1
#pragma once
namespace fertilizer
{
	template<class iterator,class ref,class ptr>
	struct ReverseIterator
	{
		typedef ReverseIterator<iterator, ref, ptr> self;
		iterator _it;
		ReverseIterator(iterator it)
			:_it(it)
		{ }
		ref operator*()
		{
			iterator tmp = _it;
			return *(--tmp);
		}
		ptr operator->()
		{
			return &(operator*());
		}
		self& operator++()
		{
			--_it;
			return *this;
		}
		self& operator--()
		{
			++_it;
			return *this;
		}
        bool operator!=(const self& s)const
        {
			return _it != s._it;
        }
        bool operator==(const self& s)const
        {
			return _it == s._it;
        }
	};
}